#!/bin/bash
#Sets reasonable web permissions
#Execute one directory up as './utils/setpermissions.sh'

echo 'Make all files readable'
find ./ -type f -print0 | xargs -0 chmod 644

echo 'Make all shell files executable'
find ./ -name "*.sh" -print0 | xargs -0 chmod u+x
find ./ -name "*.py" -print0 | xargs -0 chmod u+x
find ./ -name "*.php" -print0 | xargs -0 chmod u+x

echo 'Make all directories executable'
find ./ -type d -print0 | xargs -0 chmod 711
